
import 'package:my_flutter/http/DioEx.dart';

class LoginStore{
  LoginData? mData;
  //修改mData
  setData(LoginData data){
    mData = data;
  }
}

class LoginData implements ResponseError{
  String? nickname;
  String? password;
  String? publicName;
  String? token;
  int? type;
  String? username;

  @override
  RespData? dioError;
  LoginData.fromDioError(dynamic error) {
    dioError = error;
  }

  LoginData.fromJson(Map<String, dynamic> json) {
    nickname = json['nickname'];
    password = json['password'];
    publicName = json['publicName'];
    token = json['token'];
    type = json['type'];
    username = json['username'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['token'] = this.token;
    data['type'] = this.type;
    data['username'] = this.username;
    return data;
  }

}
